$(function() {
    var grid = $('#gridCharging').datagrid({
        iconCls: 'icon-save',
        methord: 'post',
        url: '/Main/GetChargingList',
		queryParams: {
		businessid: $('#BusinessID_gridCharging').val()},
        striped: true, //奇偶行是否区分
        columns: [[
					{ field: 'ChargingMoney', title: '交款金额' },
                    { field: 'PayMethod', title: '交款方式', formatter: function(value, row, index) {
							var name = "";
							$.ajax({
								url: '/main/GetMethodName?id=' + value,
								type: 'post',
								async: false,
								success: function(re){
									var data = eval('(' + re + ')');
									name=data.MethodName;
								}
							});
							return name;
						}},
                    { field: 'ChargingDate', title: '交款日期', formatter: $.getJsonDate}
				]],

        rownumbers: true,
        fitColumns: true,
		onLoadError: function(data, status, error){
			if(data.status == "400")
				indexPage.reLogin();
		}
    });
});